﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="AAPL.Common.DataShapes" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server" >
    <div style="margin-top:50px;">
        <h2>Showing blog posts for <%= Html.Encode(ViewData["ThisStartDate"].ToString()) %></h2>
        
        
        <% DataPage<BlogPostSearchResult> page = (DataPage<BlogPostSearchResult>)ViewData["Posts"];%>
        
        <%foreach(BlogPostSearchResult post in page.Data) {%>
            <h3><%=post.PostTitle%></h3>
            <h4>This content is property of the blog <% = post.BlogName%> and they hold the copyright. It is included here only for demo purposes.</h4>
            <div><%=post.PostSummary%></div>   
            <hr style="margin-top:20px; margin-bottom:20px;"/>
        <%}%>
        
    </div>  
    
</asp:Content>
